Working with Macros

As you become proficient with Image-Pro, you may find that you want to automate routine procedures or tailor its interface to your specific needs.  For example, you may want to automate a series of steps that are performed daily, or perform certain steps only when certain conditions exist.  You might also want to call Image-Pro functions from a program of your own creation.  These levels of customization can be achieved with the macro scripting facility provided with Image-Pro.

Macros allow you to translate a sequence of actions into a set of written instructions that can be recalled and “played back” whenever they are needed.  The scripting facility also lets you add variable definition and flow control statements (e.g., looping and branching) to these instructions, so that you can specify when and how often the actions are performed.

The macro scripting features are found in the Macros group on the Scripting ribbon (this feature may not be available to all users):

Use the Record Macro button to record a series of commands as you perform them.  When Record Macro is enabled, Image-Pro begins saving your commands to a script file using the scripting facility.  It continues to record your actions until you instruct it to stop by clicking the Stop Recording button.

Note: You can use the Pause Recording button to temporarily stop recording user actions without ending the recording session.  When the Pause Recording button is clicked again, Image-Pro will resume recording.

Once recorded, the macro will be listed the Scripting Explorer panel. If the macro has the "Favorite" property set to "Yes", it will be displayed below the Scripting Explorer tool -- click the down arrow to see it.

Click here for more detailed information about the controls of the Macros group.